/**
 * 
 */
package com.scpii.universal.service.impl;

import java.util.Date;
import java.util.HashMap;
import java.util.Map;

import javax.annotation.Resource;

import org.springframework.stereotype.Service;

import com.scpii.universal.hibernate.dao.OrderDao;
import com.scpii.universal.hibernate.entity.OrderTab;
import com.scpii.universal.service.OrderService;
import com.scpii.universal.util.UtilTool;

/**
 * universalWeb
 * @author weny
 * 2012-7-17下午02:22:31
 */
@Service
public class OrderServiceImpl extends BaseServiceImpl<OrderTab, Integer>implements OrderService {
    @Resource
	private OrderDao orderDao;
	
	@Resource
	public void setBaseDao(OrderDao orderDao) {
		super.setBaseDao(orderDao);
	}
	


	/* (non-Javadoc)
	 * @see com.scpii.universal.service.OrderService#updateDetail(java.lang.Double, java.lang.Short, java.lang.String, java.lang.String)
	 */
	@Override
	public void updateDetail(Integer intOrderId,Double dobOrderMoney, Short intOrderCount,
			String datOrderDatetime,Integer intOrderStatues) {
		// TODO Auto-generated method stub
		Map<String, Object> argsMap = new HashMap<String, Object>();
		argsMap.put("intOrderId", intOrderId);
		argsMap.put("dobOrderMoney", dobOrderMoney);
		argsMap.put("intOrderCount", intOrderCount);
		argsMap.put("datOrderDatetime", datOrderDatetime);
		argsMap.put("datUpdateDatetime", UtilTool.dateToString(new Date()));
		argsMap.put("intOrderStatues", intOrderStatues);
		// TODO Auto-generated method stub
		String updateHql=" UPDATE Order_Tab SET dob_order_money=:dobOrderMoney,int_order_count=:intOrderCount,dat_Order_Datetime=:datOrderDatetime,dat_Update_Datetime=:datUpdateDatetime,int_order_statues=:intOrderStatues WHERE int_order_id=:intOrderId";
		orderDao.sqlUpdate(updateHql, argsMap);
	}



}
